{include file="pub:header" /}

<div class="pad_lr_10" style="margin-top:10px;">
    <form id="form1" action="{:url('edit')}" method="post">
    <input type="hidden" name="id" value="{$info['id']}"/>
    <table width="100%" cellspacing="0" class="table_form">
        <tbody>
			<tr>
                <th width="80"><?php if(!$info){ ?><font color="red">*</font> <?php } ?>账号：</th>
                <td>
				{empty name="info"}
					<input name="account" type="text" class="input-text" size="30" value="{$info['account']}">
					<span class="gray ml10">数字、字母或下滑线   2-20个字符以内</span>
				{else/}
					<strong>{$info['account']}</strong>
				{/empty}
				</td>
            </tr>
			 <tr>
				<th><?php if(!$info){ ?><font color="red">*</font> <?php } ?>密码：</th>
				<td>
				{empty name="info"}
                   <input name="password" type="text" class="input-text" size="30">
				   <span class="gray ml10">3-20个字符以内</span>
				{else/}
				   <input name="password" type="text" class="input-text" size="30">
				   <span class="gray ml10">留空密码不修改</span>
                {/empty}
				</td>
			</tr>
            <tr class="api_mod">
                <th>姓名：</th>
                <td>
                    <input name="realname" type="text" value="{$info['realname']}" class="input-text" size="30">
                    <div class="Validform_checktip"></div>
                </td>
            </tr>
			<?php if(empty($admin) || !in_array($info['id'],$admin)){ ?>
			<tr class="tb_mod">
                <th>权限组：</th>
                <td>
					{foreach name="group" item="vo"}
					 <label><input type="checkbox" name="group[]" value="{$vo['id']}" {if condition="in_array($vo['id'],$roles)"}checked{/if}> {$vo['title']}</label>&nbsp;
					{/foreach}
				</td>
            </tr>
            <?php } ?>

			<tr>
				<th></th>
                <td valign="bottom">
					<input class="smt mr10" type="button" onclick="ajaxpost('form1');" value="{notempty name="info"}修改{else /}添加{/notempty}" />&nbsp;&nbsp;
				</td>
			</tr>

        </tbody>
    </table>
    </form>
</div>

{include file="pub:footer" /}
